package com.fengke.csc.interceptor;

import org.apache.log4j.Logger;

import com.fengke.util.LoggerFactory;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class BaseInterceptor extends AbstractInterceptor {
	private static final long serialVersionUID = 1L;
	private Logger logger = LoggerFactory.getLogger(BaseInterceptor.class);
	
	public String intercept(ActionInvocation invocation) throws Exception {
		before(invocation);
		String result = invocation.invoke();
		after(invocation, result);
		return result;
	}

	private void after(ActionInvocation invocation, String result) {
		logger.debug("after >>>>>>>>>>>>>>>>>>>>>");
	}

	private void before(ActionInvocation invocation) {
		logger.debug("before >>>>>>>>>>>>>>>>>>>>");
	}

}
